-- 上级练习一
begin;
insert into t_student VALUES 
(4004,'张三','男','2003-01-01',18,1,2023) ;
update t_student set student_name='李四',age=19 where id=4002;
delete from t_student where age<18;
COMMIT;
rollback;
-- 上机练习二
create DATABASE test;
use test ;
CREATE table acount (
id int auto_increment primary key,
accont_name varchar(30) not null,
phone varchar(30) not null,
balance decimal(30,5)
)
insert into acount values 
('70263055','张三','13541522563',100),
('70263056','李四','13012123443',100);
begin;
UPDATE acount set balance=balance-50 where id=70263055;
UPDATE acount set balance=balance+50 where id=70263056;
COMMIT;
rollback;

-- 上级练习三
create table student (
id int primary key  auto_increment,
student_name varchar(20) not null,
phone varchar(11) not null,
gender enum('男','女'),
index (student_name)

)
-- 上级练习四
create view s  AS select id,student_name from t_student where student_name='张耀仁';



